package com.iman.manjusri.mappers;

import com.iman.manjusri.mappers.models.DrmPaySetting;
import com.iman.manjusri.mappers.models.DrmPaySettingExample;
import java.util.List;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.ResultMap;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

public interface DrmPaySettingMapper {
    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table drm_pay_setting
     *
     * @mbggenerated Sun Mar 22 08:54:43 CST 2015
     */
    int countByExample(DrmPaySettingExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table drm_pay_setting
     *
     * @mbggenerated Sun Mar 22 08:54:43 CST 2015
     */
    int deleteByExample(DrmPaySettingExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table drm_pay_setting
     *
     * @mbggenerated Sun Mar 22 08:54:43 CST 2015
     */
    @Delete({
        "delete from drm_pay_setting",
        "where id = #{id,jdbcType=INTEGER}"
    })
    int deleteByPrimaryKey(Integer id);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table drm_pay_setting
     *
     * @mbggenerated Sun Mar 22 08:54:43 CST 2015
     */
    @Insert({
        "insert into drm_pay_setting (id, pay_tp, ",
        "pay_tradeno, pay_checkno, ",
        "pay_account, create_dt, ",
        "pay_fee, use_yn)",
        "values (#{id,jdbcType=INTEGER}, #{payTp,jdbcType=INTEGER}, ",
        "#{payTradeno,jdbcType=VARCHAR}, #{payCheckno,jdbcType=VARCHAR}, ",
        "#{payAccount,jdbcType=VARCHAR}, #{createDt,jdbcType=TIMESTAMP}, ",
        "#{payFee,jdbcType=INTEGER}, #{useYn,jdbcType=INTEGER})"
    })
    int insert(DrmPaySetting record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table drm_pay_setting
     *
     * @mbggenerated Sun Mar 22 08:54:43 CST 2015
     */
    int insertSelective(DrmPaySetting record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table drm_pay_setting
     *
     * @mbggenerated Sun Mar 22 08:54:43 CST 2015
     */
    List<DrmPaySetting> selectByExample(DrmPaySettingExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table drm_pay_setting
     *
     * @mbggenerated Sun Mar 22 08:54:43 CST 2015
     */
    @Select({
        "select",
        "id, pay_tp, pay_tradeno, pay_checkno, pay_account, create_dt, pay_fee, use_yn",
        "from drm_pay_setting",
        "where id = #{id,jdbcType=INTEGER}"
    })
    @ResultMap("BaseResultMap")
    DrmPaySetting selectByPrimaryKey(Integer id);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table drm_pay_setting
     *
     * @mbggenerated Sun Mar 22 08:54:43 CST 2015
     */
    int updateByExampleSelective(@Param("record") DrmPaySetting record, @Param("example") DrmPaySettingExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table drm_pay_setting
     *
     * @mbggenerated Sun Mar 22 08:54:43 CST 2015
     */
    int updateByExample(@Param("record") DrmPaySetting record, @Param("example") DrmPaySettingExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table drm_pay_setting
     *
     * @mbggenerated Sun Mar 22 08:54:43 CST 2015
     */
    int updateByPrimaryKeySelective(DrmPaySetting record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table drm_pay_setting
     *
     * @mbggenerated Sun Mar 22 08:54:43 CST 2015
     */
    @Update({
        "update drm_pay_setting",
        "set pay_tp = #{payTp,jdbcType=INTEGER},",
          "pay_tradeno = #{payTradeno,jdbcType=VARCHAR},",
          "pay_checkno = #{payCheckno,jdbcType=VARCHAR},",
          "pay_account = #{payAccount,jdbcType=VARCHAR},",
          "create_dt = #{createDt,jdbcType=TIMESTAMP},",
          "pay_fee = #{payFee,jdbcType=INTEGER},",
          "use_yn = #{useYn,jdbcType=INTEGER}",
        "where id = #{id,jdbcType=INTEGER}"
    })
    int updateByPrimaryKey(DrmPaySetting record);
}